package com.yudean.esb.dao.erp;

import com.yudean.esb.domain.erp.ErpIdsInsDangerInt;
import com.yudean.esb.mapper.erp.ErpIdsInsDangerIntMapper;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by zenghui on 2015-05-19.
 * desc:
 */
@Repository("ErpIdsInsDangerIntDao")
@Scope("prototype")
public class ErpIdsInsDangerIntDao {
    private static final String TAG = "ErpIdsInsDangerIntDao";

    @Resource
    private ErpIdsInsDangerIntMapper erpIdsInsDangerIntMapper;

    public int insert(ErpIdsInsDangerInt erpIdsInsDangerInt) throws Exception {
        return erpIdsInsDangerIntMapper.insert(erpIdsInsDangerInt);
    }


    public void insertBatch(List<ErpIdsInsDangerInt> dangerIntList) {
        if (null == dangerIntList || 0 == dangerIntList.size() ) {
            return;
        }
        erpIdsInsDangerIntMapper.insertBatch(dangerIntList);
    }
}
